
import Login from '../Login'
import  ZenModal from '@root/components/ZenUI/ZenModal/ZenModal'

/**
 *
 * @param hideTabIndex 隐藏掉哪一个tab
 * @param rediretTo  登录后跳转到哪个页面
 * @returns {null}
 */
export default function showLoginModal(hideTabIndex,rediretTo){
    // const [showLogin, setShowLogin] = React.useState(false);
    function closeModal(value) {
        modal.hide();
    }

    function Content(props) {
       return (
           <Login
               isModalLogin={true}
               hideTabIndex={hideTabIndex}
               rediretTo={rediretTo}
           />
       )
    }
    let options = {
        hideHeader: true,
        hideFooter:true,
        modalClass:"login-modal-reback",
        // footer: "test footer",
        content: Content,
        withoutShadow:true,
        // size: "md",
        // cbList: [closeModal],
        close: closeModal,
        backDropClass:"login-modal-backdrop",
        // hideBackdrop: true,
        closeByBackDrop: true
    };
    let modal = ZenModal.loadModal(options);
    // let modal = useModal(options);
    modal.show();
    return null;
}